﻿using Google.OrTools.ConstraintSolver;
using Study.GoogleOptimizationTools.ConsoleApp.Examples;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Study.GoogleOptimizationTools.ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            //Test();
            //ExampleLetterPuzzle.Example_1();

            var token = new CancellationTokenSource();

            Task.Run(() =>
            {
                ExampleCommonTaskSolver.t(token.Token);
            });

            if (Console.ReadKey().Key==ConsoleKey.Escape)
            {
                token.Cancel();
                Console.WriteLine("按了取消");
            }


            Console.WriteLine("done");
            Console.Read();
        }



        static void Test()
        {
            var solver = new Solver("Example_1");

            var x = solver.MakeIntVar(0, 10);
            var c = solver.MakeEquality(x, 10);

            
            Console.WriteLine(solver.WallTime());
        }
    }
}
